package require SOAP 


#root content, there is no parent content
SOAP::create addFile \
	-uri "org.jma.app.ewisdom.services.SrvFileManager" \
	-proxy "http://localhost:7042/ewisdom" \
	-params { "title" "string" "CID" "string" "pos" "integer"}
	
SOAP::create getContent \
	-uri "org.jma.app.ewisdom.services.SrvContentManager" \
	-proxy "http://localhost:7042/ewisdom" \
	-params { "CID" "string"}		

SOAP::create addContent \
	-uri "org.jma.app.ewisdom.services.SrvContentManager" \
	-proxy "http://localhost:7042/ewisdom" \
	-params { "title" "string" "comment" "string" "parent" "string" "pos" "integer"}

SOAP::create getFile \
	-uri "org.jma.app.ewisdom.services.SrvFileManager" \
	-proxy "http://localhost:7042/ewisdom" \
	-params { "FID" "string" "version" "string"}	
	
SOAP::create restoreFile\
	-uri "org.jma.app.ewisdom.services.SrvFileManager" \
	-proxy "http://localhost:7042/ewisdom" \
	-params { "FID" "string" "version" "string"}
			
SOAP::create getFileProperties \
	-uri "org.jma.app.ewisdom.services.SrvFileManager" \
	-proxy "http://localhost:7042/ewisdom" \
	-params { "FID" "string"}	
			

SOAP::create doQuery \
	-uri "org.jma.app.ewisdom.services.SrvFileManager" \
	-proxy "http://localhost:7042/ewisdom" \
	-params { "query" "string" "mode" "string"}	
	
SOAP::create getQueryResults \
	-uri "org.jma.app.ewisdom.services.SrvFileManager" \
	-proxy "http://localhost:7042/ewisdom" \
	-params { "query" "string"}		

SOAP::create removeQueryResults \
	-uri "org.jma.app.ewisdom.services.SrvFileManager" \
	-proxy "http://localhost:7042/ewisdom" \
	-params { "query" "string"}		
	
				
addContent -headers {SSAuth-userName root SSAuth-password root SSauth-initiateSession true SSauth-timeout 120000000}  MyIndex "It is a probe" null 0

#maintain the sessionuserName
set session [lindex [SOAP::getHeaders addContent] 1]
addFile -headers $session  MyFyle CID 0

getContent -headers $session MyIndex
getFile -headers $session MyFile ver_0
restoreFile -headers $session 937132545 ver_0


